﻿using System.Configuration;

namespace ERP.Framework.Components.ConfigurationHelper.CustomSettings
{
    /// <summary>
    /// Represent UISettings section in config file
    /// </summary>
    public sealed class UISettings : ConfigurationSection
    {
        #region Properties

        /// <summary>
        /// Gets the settings.
        /// </summary>
        /// <value>The settings.</value>
        internal static UISettings Settings
        {
            get
            {
                return System.Configuration.ConfigurationManager.GetSection("UISettings") as UISettings;
            }
        }

        /// <summary>
        /// Gets the current UI culture.
        /// </summary>
        /// <value>The current UI culture.</value>
        /// <remarks>default value = en</remarks>
        [ConfigurationProperty("CurrentUICulture", DefaultValue = "en", IsRequired = true)]
        public string CurrentUICulture
        {
            get
            {
                return this["CurrentUICulture"] as string;
            }
        }

        #endregion
    }
}
